class_name TweenerInfo extends RefCounted
## 补间动画信息


## 补间动画类型
var tweener_type: TweenTest.TweenerType
## 时长
var duration: float
## 延迟
var delay: float
## 缓动类型
var ease_type: Tween.EaseType
## 插值类型
var transition_type: Tween.TransitionType
## 队列模式
var queue_mode: TweenTest.TweenerQueueMode


## 构造函数
func _init(_tweener_type: TweenTest.TweenerType = TweenTest.TweenerType.PROPERTY_TWEENER, 
		_duration: float = 1.0,
		_delay: float = 0.0,
		_ease_type: Tween.EaseType = Tween.EASE_IN,
		_transition_type: Tween.TransitionType = Tween.TRANS_LINEAR,
		_queue_mode: TweenTest.TweenerQueueMode = TweenTest.TweenerQueueMode.CHAIN) -> void:
	tweener_type = _tweener_type
	duration = _duration
	delay = _delay
	ease_type = _ease_type
	transition_type = _transition_type
	queue_mode = _queue_mode


## 返回字符串
func _to_string() -> String:
	var _tweener_type: String
	match tweener_type:
		TweenTest.TweenerType.PROPERTY_TWEENER:
			_tweener_type = "PROPERTY_TWEENER"
		TweenTest.TweenerType.INTERVAL_TWEENER:
			_tweener_type = "INTERVAL_TWEENER"
		TweenTest.TweenerType.CALLBACK_TWEENER:
			_tweener_type = "CALLBACK_TWEENER"
		TweenTest.TweenerType.METHOD_TWEENER:
			_tweener_type = "METHOD_TWEENER"
	var _ease_type: String = ""
	match ease_type:
		Tween.EASE_IN:
			_ease_type = "EASE_IN"
		Tween.EASE_OUT:
			_ease_type = "EASE_OUT"
		Tween.EASE_IN_OUT:
			_ease_type = "EASE_IN_OUT"
		Tween.EASE_OUT_IN:
			_ease_type = "EASE_OUT_IN"
	var _transition_type: String = ""
	match transition_type:
		Tween.TRANS_LINEAR:
			_transition_type = "TRANS_LINEAR"
		Tween.TRANS_SINE:
			_transition_type = "TRANS_SINE"
		Tween.TRANS_QUINT:
			_transition_type = "TRANS_QUINT"
		Tween.TRANS_QUART:
			_transition_type = "TRANS_QUART"
		Tween.TRANS_QUAD:
			_transition_type = "TRANS_QUAD"
		Tween.TRANS_EXPO:
			_transition_type = "TRANS_EXPO"
		Tween.TRANS_ELASTIC:
			_transition_type = "TRANS_ELASTIC"
		Tween.TRANS_CUBIC:
			_transition_type = "TRANS_CUBIC"
		Tween.TRANS_CIRC:
			_transition_type = "TRANS_CIRC"
		Tween.TRANS_BOUNCE:
			_transition_type = "TRANS_BOUNCE"
		Tween.TRANS_BACK:
			_transition_type = "TRANS_BACK"
		Tween.TRANS_SPRING:
			_transition_type = "TRANS_SPRING"
	var _queue_mode: String = ""
	match queue_mode:
		TweenTest.TweenerQueueMode.CHAIN:
			_queue_mode = "chain"
		TweenTest.TweenerQueueMode.PARALLEL:
			_queue_mode = "parallel"
	return "{0}({1},{2},{3},{4},{5})".format([ _tweener_type, duration, delay, _ease_type, _transition_type, _queue_mode ])
